import pymysql

con = pymysql.connect(host="localhost", user="root", password="", port=3306, db="business")
cursor = con.cursor()
cursor.execute("create database if not exists business default charset utf8")
con.commit()

# 新建表
cursor.execute("use business")
cursor.execute('''CREATE table if not exists boss(
                id int auto_increment primary key,
                name varchar(20) not null,
                salary int not null)
                ''')

# cursor.execute('''insert into boss(name, salary) values
#                         ('Jack', 91),
#                         ('Harden', 1300),
#                         ('Pony', 200)
#                 ''')
cursor.execute('delete from boss where salary < 100')
con.commit()

